<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_infos', function (Blueprint $table) {
            $table->increments('id');
            $table->string('rel_name',20)->nullable()->comment('姓名');
            $table->string('telephone',20)->index()->comment('手机号');
            $table->string('id_number',30)->nullable()->index()->comment('身份证号');
            $table->string('email',50)->nullable()->index()->comment('邮箱');



            $table->date('birthday')->nullable()->comment('生日');
            $table->string('gender',50)->nullable()->comment('性别1男 2女');
            $table->string('annual_income',50)->nullable()->index()->comment('年收入');
            $table->string('marriage',2)->nullable()->comment('婚姻状况1已婚 2未婚');
            $table->string('child_sex',2)->nullable()->comment('子女性别 1男 2女');
            $table->date('child_birthday')->nullable()->comment('子女生日');
            $table->string('child_name',100)->nullable()->comment('子女姓名');
            $table->string('child_name',100)->nullable()->comment('喜好');
            $table->string('demands',255)->nullable()->comment('特殊需求');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_infos');
    }
}
